{% extends "school/layout.html" %}

{% set page_title = translate('账号设置') %}

{% block content %}
<div class="m-content">
    <form class="form-horizontal" method="POST">
        {{ form.hidden_tag() }}
        <fieldset class="fieldset">
            <legend>{{translate('机构信息')}}<span style="color:#777;font-size:15px;">（{{translate('若需更改机构信息，请与管理员联系')}}）</span><a href="/school/change-password" style="color:#999;margin-left:400px;font-size:14px;">{{translate('修改密码')}}</a></legend>
            <div class="form-group">
                {{ form.display_name.label(class_="control-label") }}
                {% if current_user.is_admin %}
                {{ form.display_name(class_="form-control", required=True) }}
                {% else %}
                {{ form.display_name(class_="form-control", required=True, readonly=True) }}
                {% endif %}
            </div>

            <div class="form-group">
                {{ form.scale.label(class_="control-label") }}
                <select name="scale" class="form-control" readonly>
                {% for option in form.scale %}
                    {{ option }}
                {% endfor %}
                </select>
            </div>

            <div class="form-group">
                {{ form.contact_name.label(class_="control-label") }}
                {{ form.contact_name(class_="form-control", required=True, readonly=True) }}
            </div>

            <div class="form-group">
                {{ form.phone.label(class_="control-label") }}
                {{ form.phone(class_="form-control", required=True, readonly=True) }}
            </div>

            <div class="form-group">
                {{ form.email.label(class_="control-label") }}
                {{ form.email(class_="form-control", pattern="^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+", required=True, readonly=True) }}
            </div>

            <div class="form-group">
                {{ form.school_type.label(class_="control-label") }}
                <select name="school_type" class="form-control" disabled>
                    {% for option in form.school_type %}
                        {{ option }}
                    {% endfor %}
                </select>
            </div>
            <div>
                <button class="btn btn-primary">{{translate('确认')}}</button>
            </div>
        </fieldset>
        {#
        <fieldset class="fieldset field-bind">
            <div class="erweima">
                <div class="qr_title">{{translate('扫描二维码推送成绩')}}</div>
                <iframe id="qr_code" src="{{ url_for('school.bind_qr_code') }}" scrolling="no"></iframe>
            </div>
        </fieldset>
        #}
    </form>
</div>
{% endblock %}

{% block css %}
<style type="text/css">
#qr_code{width:145px;height:145px;overflow:hidden;border:none;}
.qr_title{text-align:center}
</style>
{% endblock %}
